package com.neouton.crm.pm.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.neouton.common.entity.BaseEntityVO;
import com.neouton.crm.entity.SysUserEntity;
import com.neouton.crm.op.entity.SalesOpportunityVO;
import com.neouton.crm.payRecords.entity.PaymentRecords;
import com.neouton.crm.payRecords.entity.PaymentRequest;
import com.neouton.crm.paymentPlan.entity.PaymentPlan;
import com.neouton.crm.receiptRecords.entity.ReceiptRecords;
import com.neouton.crm.refundRecords.entity.RefundRecordsVO;
import com.neouton.crm.sales.entity.SalesAuditVO;
import com.neouton.crm.sales.entity.SalesChangeVO;
import com.neouton.crm.sales.entity.SalesFileRelationVO;
import com.neouton.crm.sales.entity.SalesStageVO;
import com.neouton.encrypt.typehandler.Encrypt;
import lombok.Data;

/**
 * 项目管理表
 * @TableName sales_project_manage
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SalesProjectManageVO extends BaseEntityVO implements Serializable {
    /**
     * 项目管理主键
     */
    private Integer projectManageId;

    /**
     * 项目名称
     */
    private String projectTheme;

    /**
     * 项目编号
     */
    private String projectNumber;

    /**
     * 机会
     */
    private Integer projectOpportunityId;
    /**
     * 机会名称
     */
    private String opportunityTheme;
    /**
     * 项目机会集合
     */
    private List<Integer> projectOpportunityList;

    /**
     * 客户ID
     */
    private Integer customerId;
    /**
     * 客户名
     */
    private String customerName;
    /**
     * 客户集合
     */
    private List<Integer> customerList;

    /**
     * 项目类型
     */
    private Integer projectType;
    /**
     * 项目类型名
     */
    private String projectTypeName;
    /**
     * 项目类型集合
     */
    private List<Integer> projectTypeList;

    /**
     * 项目类别
     */
    private Integer projectClasses;
    /**
     * 项目类别名
     */
    private String projectClassesName;
    /**
     * 项目类别集合
     */
    private List<Integer> projectClassesList;

    /**
     * 负责人
     */
    private Integer projectPrincipal;
    /**
     * 负责人id
     */
    private String projectPrincipalId;
    /**
     * 负责人姓名
     */
    private String projectPrincipalName;
    /**
     * 负责人集合
     */
    private List<Integer> projectPrincipalList;

    /**
     * 项目成员id
     */
    private String projectMemberId;
    /**
     * 项目成员id集合
     */
    private List<String> memberIds;

    /**
     * 项目概要
     */
    private String projectSummary;

    /**
     * 立项时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Timestamp projectCreatetime;
    /**
     * 立项时间集合
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private List<Timestamp> projectCreatetimeList;
    /**
     * 立项时间始
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Timestamp projectCreatetimeStart;
    /**
     * 立项时间末
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Timestamp projectCreatetimeEnd;

    /**
     * 项目状态
     */
    private Integer projectState;
    /**
     * 项目状态名
     */
    private String projectStateName;
    /**
     * 项目状态集合
     */
    private List<Integer> projectStateList;

    /**
     * 项目预计签单日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Timestamp projectExpectTime;
    /**
     * 项目预计签单日期集合
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private List<Timestamp> projectExpectTimeList;
    /**
     * 项目预计签单日期始
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Timestamp projectExpectTimeStart;
    /**
     * 项目预计签单日期末
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Timestamp projectExpectTimeEnd;

    /**
     * 业务ID
     */
    private Integer businessId;

    /**
     * 项目可能性
     */
    private Integer projectPossibility;
    /**
     * 项目可能性集合
     */
    private List<Integer> projectPossibilityList;

    /**
     * 项目合同金额
     */
    private String projectExpectMoney;


    /**
     * 项目合同金额值
     */
    private String projectExpectMoneyValue;

    /**
     * 项目合同金额集合
     */
    private List<String> projectExpectMoneyList;
    /**
     * 项目合同金额小
     */
    private String projectExpectMoneySmall;
    /**
     * 项目合同金额大
     */
    private String projectExpectMoneyLarge;

    /**
     * 项目区分id
     */
    private Integer projectDifferentId;
    /**
     * 项目区分名
     */
    private String projectDifferentName;
    /**
     * 项目区分id集合
     */
    private List<Integer> projectDifferentIdList;

    /**
     * 项目管理费用
     */
    private Encrypt projectManageMoney;
    /**
     * 项目管理费用值
     */
    private String projectManageMoneyValue;
    /**
     * 项目管理费用集合
     */
    private List<String> projectManageMoneyList;
    /**
     * 项目管理费用小
     */
    private Encrypt projectManageMoneySmall;
    /**
     * 项目管理费用大
     */
    private Encrypt projectManageMoneyLarge;

    /**
     * 审核状态
     */
    private Integer auditState;
    /**
     * 审核状态名
     */
    private String auditStateName;
    /**
     * 审核状态集合
     */
    private List<Integer> auditStateList;

    /**
     * 审批状态
     */
    private Integer approveState;
    /**
     * 审批状态名
     */
    private String approveStateName;
    /**
     * 审批状态集合
     */
    private List<Integer> approveStateList;

    /**
     * 项目变更状态集合
     */
    private List<Integer> updateStatusList;

    /**
     * 阶段状态id
     */
    private Integer stageStateId;
    /**
     * 阶段状态名
     */
    private String stageStateName;
    /**
     * 阶段状态id集合
     */
    private List<Integer> stageStateIdList;

    /**
     * 阶段备注
     */
    private String stageRemark;

    private static final long serialVersionUID = 1L;

    /**
     * 机会表
     */
    private SalesOpportunityVO opportunityVO;

    /**
     * 合同表
     */
    private List<ContractInfoVO> contractInfos;

    /**
     * 采购
     */
    private List<PurchaseOrderVO> purchaseOrders;

    /**
     * 内部采购
     */
    private List<PurchaseOrderVO> inPurchaseOrders;

    /**
     * 付款计划
     */
    private List<PaymentPlan> paymentPlans;
    /**
     * 收票记录
     */
    private List<ReceiptRecords> receiptRecords;
    /**
     * 付款申请
     */
    private List<PaymentRequest> paymentRequests;

    /**
     * 付款记录
     */
    private List<PaymentRecords> paymentRecords;
    /**
     * 回款计划
     */
    private List<BackMoneyPlanVo> backMoneyPlanVos;
    /**
     * 开票申请
     */
    private List<BillingApplyDto> billingApplyDtos;
    /**
     * 开票记录
     */
    private List<BillingRecordVo> billingRecordVos;
    /**
     * 回款记录
     */
    private List<BackMoneyRecordVo> backMoneyRecordVos;
    /**
     * 成员
     */
    private List<ProjectMemberVO> projectMemberVO;
    /**
     * 审核
     */
    private List<SalesAuditVO> salesAuditVO;
    /**
     * 阶段
     */
    private List<SalesStageVO> salesStageVO;
    /**
     * 变更记录
     */
    private List<SalesChangeVO> salesChangeVO;
    /**
     * 文件
     */
    private List<SalesFileRelationVO> salesFileRelationVO;
    /**
     * 阶段停留时间
     */
    private Integer stageStayTime;
    /**
     * 阶段停留时间集合
     */
    private List<Integer> stageStayTimeList;
    /**
     * 阶段停留时间始
     */
    private Integer stageStayTimeStart;
    /**
     * 阶段停留时间末
     */
    private Integer stageStayTimeEnd;
    /**
     * 阶段变更时间
     */
    private Timestamp stageUpdateTime;

    /**
     * 文件
     */
    private List<SalesFileRelationVO> messageFileRelation;

    /**
     * 文件id集
     */
    private List<String> fileIds;

    /**
     * 当前页面
     */
    private Integer pageNum;
    /**
     * 页数
     */
    private Integer pageSize;
    /**
     * 用户姓名
     */
    private String userName;
    /**
     * 抄送对象ID，逗号分隔
     */
    private String copyFor;

    /**
     * 所有事件
     */
    private List<Object> allThings = new ArrayList<>();

    /**
     * 所有文件
     */
    private List<SalesFileRelationVO> documents;

    /**
     * 联系人
     */
    private List<SysUserEntity> contacts;

    /**
     * 初审申请
     */
    private String reasonApplicationOne;

    /**
     * 初审意见
     */
    private String processCommentsOne;
    /**
     * 终审申请
     */
    private String reasonApplication;

    /**
     * 终审意见
     */
    private String processComments;

    /**
     * 审批主表ID
     */
    private Integer approvalId;


    private List<Integer> approvalList;

    /**
     * 审批主表ID初审
     */
    private Integer approvalIdOne;
    private List<Integer> approvalOneList;

    /**
     * 前端排序标识
     */
    @TableField(exist = false)
    private String orderByColum;

    @TableField(exist = false)
    private String orderByProp;

    @TableField(exist = false)
    private String order;

    /**
     * 跟单视图回款、开票、已回金额汇总显示
     */
    private ShowMoneyVo showMoneyVo;

    /**
     * 合同表
     */
    private List<RefundRecordsVO> refundRecords;

    /**
     * 年
     */
    private String year;

    /**
     * 月
     */
    private String month;

    /**
     * 项目管理费用 page
     */
    private String projectManageMoneyPage;
    /**
     * 项目管理费用 total
     */
    private String projectManageMoneyTotal;

    /**
     * 项目合同金额 page
     */
    private String projectExpectMoneyPage;
    /**
     * 项目合同金额 total
     */
    private String projectExpectMoneyTotal;

    /**
     * 创建时间开始
     */
    private Timestamp createDataTimeStart;

    /**
     * 创建时间结束
     */
    private Timestamp createDataTimeEnd;

    /**
     * 视图信息集合
     */
    private Map<String, Double> viewList;

    /**
     * 已回款金额
     */
    private String returnedMoney;
    private String returnedMoneyPage;
    private String returnedMoneyTotal;

    /**
     * 已开票金额
     */
    private String invoicedMoney;
    private String invoicedMoneyPage;
    private String invoicedMoneyTotal;

    /**
     * 已付款金额
     */
    private String paymentedMoney;
    private String paymentedMoneyPage;
    private String paymentedMoneyTotal;

    /**
     * 已收票金额
     */
    private String collectTicketedMoney;
    private String collectTicketedMoneyPage;
    private String collectTicketedMoneyTotal;

    private Timestamp lastUpdateTimeOne;

    /**
     * 申请人
     */
    private Integer applicant;
    /**
     * 申请时间
     */
    private Timestamp applyTime;
    /**
     * 下一处理人
     */
    private Integer nextApprover;
    /**
     * 待办编号
     */
    private String approvalCode;
    /**
     * 申请人
     */
    private Integer applicantOne;
    /**
     * 申请时间
     */
    private Timestamp applyTimeOne;
    /**
     * 下一处理人
     */
    private Integer nextApproverOne;
    /**
     * 待办编号
     */
    private String approvalCodeOne;

    /**
     * 查询的类型名称，用于区分
     */
    private String typeName;
    /**
     * 转发人集合
     */
    private List<SysUserEntity> senderList;

    private Integer updateStatus;

    private String isUpdate;
    /**
     * 项目采购总额
     */
    private String purchaseMoney;
    private String purchaseMoneyPage;
    private String purchaseMoneyTotal;

    /**
     * 项目采购总额
     */
    private String internalPurchaseMoney;
    private String internalPurchaseMoneyPage;
    private String internalPurchaseMoneyTotal;
    /**
     * 项目报销总额
     */
    private String reimburseMoney;
    private String reimburseMoneyPage;
    private String reimburseMoneyTotal;

    /**
     *  项目总额
     */
    private String projectMoney;
    private String projectMoneyPage;
    private String projectMoneyTotal;
    /**
     * 实时利润
     */
    private String realTimeProfitMoney;

    /**
     * 目标年份
     */
    private String targetYear;


    /**
     * 质保金额
     */
    private String warrantyDeposit;

    private String warrantyDepositPage;

    /**
     * 是否有质保服务 1 有 0 无
     */
    private Integer warranty;
    /**
     * 退款总额
     */
    private String refundMoney;
    /**
     * 已付总额
     */
    private String paymentMoney;
    /**
     * 人天服务
     */
    private String purchaseProductTotalPrice;
    /**
     * 质保服务
     */
    private String projectWarrantyDeposit;

}